package com.zhu.mpg.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.zhu.mpg.entity.Employee;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author caoyunqi
 * @since 2021-03-17
 */

public interface EmployeeMapper extends BaseMapper<Employee> {

    List<Employee> findEmpPage(Page page);
    @Update(" UPDATE employee SET deptno=(SELECT deptno FROM Dept WHERE dname=#{deptname}),ename=#{ename},job=#{job},hiredate=#{hiredate},sal=#{sal} WHERE empno=#{empno}")
    int xiugai(Employee employee);
    @Delete("DELETE FROM employee WHERE empno=${empno}")
    int shanchu(int bh);
}
